<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1.0, maximum-scale=1, user-scalable=no" charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="/app/css/media.css"/>
    <link rel="stylesheet" type="text/css" href="/app/css/common.css"/>

    <title>漏洞扫描</title>
    <link href="/app/css/mui.picker.css" rel="stylesheet" />
    <link href="/app/css/mui.poppicker.css" rel="stylesheet" />
    <link rel="stylesheet" type="text/css" href="/app/css/index.css"/>
    <script src="//do.yunzhijia.com/pub/js/qingjs.js"></script>
    <link href="//cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <link href="//cdn.bootcss.com/bootstrap-slider/9.4.1/css/bootstrap-slider.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="/app/css/index.css"/>
    <script src="/app/js/jquery-3.0.0.min.js"></script>
    <script src="/layer/layer.js"></script>
    <script src="http://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script src="http://cdn.bootcss.com/bootstrap-slider/9.4.1/bootstrap-slider.min.js"></script>

</head>
<body style="background: #eaeff3;>
<div class="main_div">
<div class="main_body" style="height: 580px;">

    <p class="topTip_p">客户经理折扣为6折。</p>
    <div class="listing">
        <div class="items">
            <div class="item">
                <div class="iconDiv"><i>
                    <img src="/app/image/scanner.png" width="22px" ;="" height="22px">
                </i></div>
                <h4 class="title">漏洞扫描</h4>
                <ul class="config_ul">
                    <li id="showScanicker">
                        <span class="left">规模</span>
                        <div class="rightDiv right_scan">
                            <span class="left scan" id="scanResult">微型 [2-5) </span><i class="_icon left">
                            <img src="/app/image/go_right.png">
                        </i>
                        </div>

                    </li>
                </ul>
            </div>
            <div class="summary_div">
                <ul class="configInfo_ul left">
                    <li>规模:<span id="sLCount" value="1">微型 [2-5) </span></li>

                </ul>
                <p class="price_p right " id="sL_price">￥4800</p>
                <p class="price_p right " id="sL_old_price" style="display: none"></p>
            </div>
        </div>
    </div>
</div>
<#include "foot.ftl">
<#--//九个计算值
        //CPU-->
<input type="hidden" id="total_cpu_t" name="total_cpu_t" value="0">
<input type="hidden" id="total_cpu_a" name="total_cpu_a" value="0">
<input type="hidden" id="total_cpu_d" name="total_cpu_d" value="4800">

<input hidden id="discount_name" name="discount_name" value="1">

<#--//存储-->
<input type="hidden" id="guiGe" name="guiGe" value="[2-5)">
<input type="hidden" id="guiMo" name="guiMo" value="微型">



<input type="hidden" name="flag" id="flag" value="0">
<input type="hidden" name="flagNum" id="flagNum" value="0">
<input type="hidden" name="flag_die" id="flag_die" value="1">
<input type="hidden" name="flag_die_flag" id="flag_die_flag" value="1">
<input type="hidden" name="title" id="title" value="${title}">
<input type="hidden" name="openId" id="openId" value="${openId}">
</div>
<script src="/app/js/mui.min.js"></script>
<script src="/app/js/mui.poppicker.js"></script>
<script src="/app/js/mui.picker.min.js"></script>
<script src="/app/js/yun_title.js"></script>
<script>

    $("#allprice").text("￥4800");
    $("#ali_price").text("￥3000");
    $("#tx_price").text("无此规格");
    (function($, doc) {
        $.init();
        $.ready(function() {
            //规格下拉框
            var scanPicker = new $.PopPicker();
            scanPicker.setData(
                    [{value:4800,text:'微型 [2-5)',content:'微型',contentVal:'[2-5)'},
                    {value:3800,text:'小型 [5,10)',content:'小型',contentVal:'[2-5)'},
                    {value:3600,text:'中型 [10,20)',content:'中型',contentVal:'[2-5)'},
                    {value:3400,text:'大型 [20,50)',content:'大型',contentVal:'[2-5)'},
                    {value:3200,text:' 超大型 50 以上',content:'超大型',contentVal:'[2-5)'}
                    ]
            );
            var showScanickerPickerButton = doc.getElementById('showScanicker');
            var scanResult = doc.getElementById('scanResult');
            var sL_price= doc.getElementById("sL_price");
            var sLCount=doc.getElementById('sLCount');
            var allprice=doc.getElementById('allprice');
            var ali_price=doc.getElementById('ali_price');
            var total_cpu_d=doc.getElementById('total_cpu_d');
            var guiGe=doc.getElementById('guiGe');//规格
            var guiMo=doc.getElementById('guiMo');//规模
            //初始化计算价格
            //CPU点击事件
            showScanickerPickerButton.addEventListener('tap', function(event) {
                scanPicker.show(function(items) {
                    scanResult.innerText = items[0].text;
                    sLCount.innerHTML= items[0].text;
                    sL_price.innerText = "￥"+items[0].value;
                    allprice.innerHTML="￥"+items[0].value;
                    guiGe.value=items[0].contentVal;
                    guiMo.value=items[0].content;
                    total_cpu_d.value=items[0].value;
                    if(items[0].value==4800){
                        ali_price.innerHTML="￥3000";
                    }
                    else {
                        ali_price.innerHTML="无此规格";
                    }
                });



            }, false);
        });
    })(mui, document);


    $('.checkInfo_right').click(function () {
        var openId=$('#openId').val();
        //VCPU
        var guiMo=$('#guiMo').val();
        var guiGe=$('#guiGe').val();
        var yuanJia=$('#total_cpu_d').val();
        //三个价格
        var aliprice=$('#ali_price').text();
        var txprice=$('#tx_price').text();
        var allprice=$('#allprice').text();
        if(aliprice=="无此规格"){
            aliprice=0;
        }
        else {
            aliprice=aliprice.substring(1);
        }
        if(txprice=="无此规格"){
            txprice=0;
        }
        else {
            txprice=txprice.substring(1);
        }
        allprice=allprice.substring(1);

        var data1 = {
            cpuAndMem:guiMo,
            meMory:'',
            stat:yuanJia,
            brandNum:guiGe,

            ali_price:aliprice,
            tx_price:txprice,
            all_price:allprice,
            productTypeId:5,//漏洞扫描是5
            productName:'漏洞扫描',
            oneKey:'规模',
            twoKey:'价格',
            threeKey:'规格',
            disCount:'1',
            oneImage:'list_icon4',
            twoImage:'list_icon8',
            threeImage:'list_icon9'
        }
        $.post("/takeList/"+openId+"/",data1,function(data){
            if(data.type=="success"){
                layer.msg(data.msg);
            }
        });
    });

</script>


</body>

</html>
